package com.neusoft.bizcore.auth.service;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.neusoft.bizcore.auth.dto.AuthRoleCreateUpdateDTO;
import com.neusoft.bizcore.auth.dto.AuthRoleDTO;
import com.neusoft.bizcore.web.support.Searchable;

public interface AuthRoleService {

    List<AuthRoleDTO> findAll();

    Page<AuthRoleDTO> search(Pageable pageable, Searchable searchable);

    AuthRoleDTO create(AuthRoleCreateUpdateDTO dto);

    AuthRoleDTO create(AuthRoleDTO dto);

    AuthRoleDTO details(Long id);

    void delete(Long id);

    AuthRoleDTO update(Long id, AuthRoleCreateUpdateDTO dto);

    AuthRoleDTO bindUsers(Long id, List<Long> users);

    AuthRoleDTO addUsers(Long id, List<Long> users);

    AuthRoleDTO removeUsers(Long id, List<Long> users);

    AuthRoleDTO bindPermissions(Long id, List<Long> permissions);

    AuthRoleDTO addPermissions(Long id, List<Long> permissions);

    AuthRoleDTO removePermissions(Long id, List<Long> permissions);

    AuthRoleDTO detailsByCode(String code);

}
